class LevelData{
    public zhangjie: number;

    public level: number;

    public chengjiu: string;

    public questions: Array<QuestionData>;

    public results: Array<ResultData>;

    public constructor() {
        // let storage = egret.localStorage.getItem("level");
        
        this.initData();
    }

    public initData(){
        this.zhangjie = UserMgr.ins.chapter-1;
        this.level = UserMgr.ins.level-1;
        this.chengjiu = CommonData.zhangJie[this.zhangjie].name;
        this.questions = Question.ins.questions[this.zhangjie][this.level];
        this.results  = <Array<ResultData> >Result.ins.results[this.zhangjie][this.level];
    }

    public chooseLevel(zhang: number, level: number){
        this.zhangjie = zhang;
        this.level = level;
        this.chengjiu = CommonData.zhangJie[this.zhangjie].name;
        this.questions = Question.ins.questions[this.zhangjie][this.level];
        this.results  = <Array<ResultData> >Result.ins.results[this.zhangjie][this.level];
    }
}

class QuestionData{
    public x: number;

    public y: number;

    public f: number;

    public a: number;
}

class ResultData{
    public x: number;

    public y: number;

    public index: number;
}